/*
 * @Date: 2022-04-01 14:27:54
 * @LastEditors: LiuPeng
 * @LastEditTime: 2022-04-01 14:44:35
 * @FilePath: \pay\src\components\Info\AgencyCardList\FundOperationInfo.jsx
 * @Description: 资金操作
 * 
 */
import React from 'react'

import {
  Form, Input, Select,
  Row, Col, Button, Space
} from 'antd'

import './../../../components/HOC/HocButton/index.css'

const { Option } = Select;

// 帐变类型 用于渲染下拉列表
const AccountChangeType = [
  { id: 1, name: '入金账变' },
  { id: 2, name: '代付账变' },
  { id: 3, name: '手动上分' },
  { id: 4, name: '手动下分' },
  { id: 5, name: '提现' },
  { id: 6, name: '冲正' },
  { id: 7, name: '其他' },
];


export default function FundOperationInfo() {
  /* 验证规则  Form.Item*/
  const rules = [{ required: true, message: '必填项不能为空！' }]
  return (
    <div style={{ 'padding': '10px 5px' }}>
      {/* 修改 */}
      <Form
        name="repeatPasswordForm"
        labelCol={{ span: 8 }}
        wrapperCol={{ span: 16 }}
        autoComplete="off"
      >
        <Row>
          {/* 金额 */}
          <Col span={12}>
            <Form.Item
              label="金额"
              name="amountOfMoney"
              rules={rules}

            >
              <Input />
            </Form.Item>
          </Col>
          {/* 帐变类型  来源*/}
          <Col span={12}>
            <Form.Item
              label="帐变类型"
              name="AccountChangeTypeSource"
              initialValue='收入'
            >
              <Select >
                <Option value="收入">收入</Option>
                <Option value="支出">支出</Option>
              </Select>
            </Form.Item>
          </Col>
          {/* 帐变类型 */}
          <Col span={12}>
            <Form.Item
              label="帐变类型"
              name="AccountChangeType"
              initialValue='收入'
            >
              <Select >
                {
                  AccountChangeType.map(item => {
                    return (
                      <Option key={item.id} value={item.name}>
                        {item.name}
                      </Option>
                    )
                  })
                }
              </Select>
            </Form.Item>
          </Col>
          {/* 备注 */}
          <Col span={12}>
            <Form.Item
              label="备注"
              name="remarks"
              rules={rules}
            >
              <Input />
            </Form.Item>
          </Col>
        </Row>
        {/* 按钮区域 */}
        <Row>
          <Col span={24} style={{ textAlign: 'center' }}>
            <Space
              size='large'
            >
              <Button type='primary' className='green'>提交</Button>
              <Button type='primary' className='green'>取消</Button>
            </Space>
          </Col>
        </Row>
      </Form>

    </div>
  )
}
